import request from '@/utils/request'
import Qs from 'qs'

const evaluationApi = {
  list: params => request({
    url: `evaluation?${Qs.stringify(params)}`,
    method: 'get',
    data: { notLoading: true }
  }),
   

  getStaffStatistics: params => request({
    url: `evaluation/getStaffStatistics?${Qs.stringify(params)}`,
    method: 'get',
    data: { notLoading: true }
  }),

  getRoomStatistics: params => request({
    url: `evaluation/getRoomStatistics?${Qs.stringify(params)}`,
    method: 'get',
    data: { notLoading: true }
  }),

  addEvaluation: data => request({
    url: `api/addEvaluation`,
    method: 'post',
    data
  }),
  save: data => request({
    url: `evaluation`,
    method: 'post',
    data
  }),
  update: data => request({
    url: `evaluation`,
    method: 'put',
    data
  }),
  remove: id => request({
    url: `evaluation/${id}`,
    method: 'delete'
  })
}

export default evaluationApi
